home *** CD-ROM | disk | FTP | other *** search
- Path: thorn.cc.usm.edu!news
- From: rmfulce@ocean.st.usm.edu (Mike Fulce)
- Newsgroups: comp.lang.c
- Subject: Limiting stdin input to "n" chars
- Date: 8 Mar 1996 23:26:04 GMT
- Organization: University of Southern Mississippi
- Message-ID: <4hqfmc$un7@thorn.cc.usm.edu>
- NNTP-Posting-Host: spruce.cc.usm.edu
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- How do you limit the number of characters read from stdin? What I want to do
- is to automatically do a carriage return after a user enters say.. 2 digits.
- I've written a few programs using scanf to get input, but it won't work for
- what I need now. (I think it's because scanf is buffered I/O?).
-
- Please e-mail all responses to me and I will post a summary.
-
- TIA
- ______________________________________________________________________________
- Mike Fulce Programmer Analyst
- Computing Center University of Southern Mississippi
- m.fulce@usm.edu http://ocean.st.usm.edu/~rmfulce
- 207C Forrest County Hall (601) 266-4103
-
-